package cn.tedu.notice0707.base.response;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class json
{
    private Integer state;
    private String message;
    private Object data;

    public json(re re)
    {
        this.state = re.getState();
        this.message = re.getMessage();
        this.data =null;
    }
    public json(re re,Object data)
    {
        this.state = re.getState();
        this.message = re.getMessage();
        this.data = data;
    }
    public static json suc()
    {return new json(re.SUCCESS);}
    public static json suc(Object data)
    {return new json(re.SUCCESS, data);}

}
